package com.biao.java8.optional_test;

import com.biao.java8.demo.pojo.Employee;

import java.util.Optional;

public class Demo01 {
    public static void main(String[] args) {
        Employee employee = new Employee("abiu", 18, 20000d);
        String name = Optional.ofNullable(employee).map(Employee::getName).orElse("aaa");
        System.out.println(name);
    }
}
